<?php
class OtherAction extends UserAction{
	//配置
	public function index(){
		$other=M('Other')->where(array('token'=>session('token')))->find();
		if(IS_POST){
			if($other==false){				
				$this->all_insert('Other','/index');
			}else{
				$_POST['id']=$other['id'];
				$this->all_save('Other','/index');				
			}
		}else{
			//判断是否开启客服功能，以确定前台是否显示进入链接
			$token_open = M('token_open')->where(array('token'=>session('token')))->find();
			$funStr = $token_open['queryname'];
			/* if(!strpos($funStr,'kefu')){
				$this->assign('kefu','0');
			}else {
				$this->assign('kefu','1');
			} */
			
			//dump($other);
			$this->assign('other',$other);
			$this->display();
		}
	}
	
}



?>